################################################################################

default: all

RM := rm -rf

# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include Foundation/subdir.mk
-include Foundation/Tessellation/subdir.mk
-include Foundation/Terrain/subdir.mk
-include Foundation/System/subdir.mk
-include Foundation/Surfaces/subdir.mk
-include Foundation/Sorting/subdir.mk
-include Foundation/SharedArrays/subdir.mk
-include Foundation/Shaders/subdir.mk
-include Foundation/SceneGraph/subdir.mk
-include Foundation/Physics/subdir.mk
-include Foundation/ObjectSystem/subdir.mk
-include Foundation/Numerics/subdir.mk
-include Foundation/Miscellaneous/subdir.mk
-include Foundation/Meshes/subdir.mk
-include Foundation/Math/subdir.mk
-include Foundation/Intersection/subdir.mk
-include Foundation/Interpolation/subdir.mk
-include Foundation/ImageAnalysis/subdir.mk
-include Foundation/Effects/subdir.mk
-include Foundation/Distance/subdir.mk
-include Foundation/Detail/subdir.mk
-include Foundation/Curves/subdir.mk
-include Foundation/Controllers/subdir.mk
-include Foundation/Containment/subdir.mk
-include Foundation/Collision/subdir.mk
-include Foundation/Approximation/subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables 

# All Target
all: libsoar-wildmagic.so

# Tool invocations
libsoar-wildmagic.so: $(OBJS) $(USER_OBJS)
	@echo 'Building target: $@'
	@echo 'Invoking: GCC C++ Linker'
	g++ -shared -o"libsoar-wildmagic.so" $(OBJS) $(USER_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '
	$(MAKE) --no-print-directory post-build

# Other Targets
clean:
	-$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(LIBRARIES)$(CPP_DEPS)$(CXX_DEPS)$(C_UPPER_DEPS) libsoar-wildmagic.so
	-@echo ' '

post-build:
	-mv libsoar-wildmagic.so ../../lib/libsoar-wildmagic.so
	-@echo ' '

.PHONY: all clean dependents
.SECONDARY: post-build

-include ../makefile.targets
